<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="p" uri="http://primefaces.prime.com.tr/ui"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view>
	<html xmlns="http://www.w3.org/1999/xhtml"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:p="http://primefaces.prime.com.tr/ui">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title><h:outputText
		value="#{message.mainHeader} - #{message.adminManageGroupsHeader}" /></title>
	<p:resources />
	<style type="text/css">
<!--
.select-menu {
	width: 200px;
	height: 300px;
	padding: 5px;
	padding-left: 1px;
	font-weight: bold;
	font-size: 12px;
	color: #223C75;
	background: #f1f1f1;
	border: 1px #666666 solid;
}

.select-menu select {
	width: 200px;
	height: 300px;
	padding: 5px;
	padding-left: 1px;
	font-weight: bold;
	font-size: 12px;
	color: #223C75;
	background: #f1f1f1;
	border: 1px #666666 solid;
}

.select-menu select option {
	padding: 3px;
}
-->
</style>
<link rel="stylesheet" type="text/css" href="../style.css" />	
<style type="text/css">
.matrix { font-family:Lucida Console, Courier, Monotype; font-size:15pt; text-align:center; width:12px; padding:0px; margin:0px;}
</style>
	<script src="../matrix.js" type="text/javascript"></script>

	</head>
	<body>

	<title><h:outputText value="#{message.mainHeader}"/></title>
	<p:resources />

	<link rel="stylesheet" type="text/css" href="style.css" />	
<style type="text/css">
.matrix { font-family:Lucida Console, Courier, Monotype; font-size:15pt; text-align:center; width:12px; padding:0px; margin:0px;}
</style>
	<script src="matrix.js" type="text/javascript"></script>

	</head>
	<body><center>
	<h:panelGrid  width="900" border="0" columns="2" >
		<h:panelGroup style="width: %70;">
		 <h:graphicImage value="../images/dunya.png"></h:graphicImage>
		 
		</h:panelGroup>
		<h:panelGroup><div id="matrix">SANAL KITAPLIK</div></h:panelGroup>
	</h:panelGrid>	
	<h:panelGrid  width="900" border="0" columns="1" >
		<h:panelGroup><h:form>
			<p:menubar>
				<p:submenu label="Ana Sayfa">
				</p:submenu>
				<p:submenu label="Kitaplar">
					<p:menuitem value="Çok Satanlar"></p:menuitem>
					<p:menuitem value="Yeni Eklenenler"></p:menuitem>
					<p:menuitem value="Acil olanlar"></p:menuitem>
				</p:submenu>
				<p:submenu label="Ders Notları">
					<p:menuitem value="Çok Satanlar"></p:menuitem>
					<p:menuitem value="Yeni Eklenenler"></p:menuitem>
				</p:submenu>
				<p:submenu label="Kullanıcı Görüşleri">
					<p:menuitem value="ddde"></p:menuitem>
				</p:submenu>
			</p:menubar></h:form>
		</h:panelGroup>
		</h:panelGrid>	
		<h:panelGrid  width="900" border="0" columns="2"  style="background-image:url('../images/seffaf.png');text-align:center;">
				<h:form id="adminControlMenu">
			<h:panelGrid columns="1">
				<h:commandLink id="manageAccount">
					<h:outputLabel value="#{message.manageAccount}" />
				</h:commandLink>
				<h:commandLink id="manageAdmins">
					<h:outputLabel value="#{message.manageAdmins}" />
				</h:commandLink>
				<h:commandLink id="manageUsers">
					<h:outputLabel value="#{message.manageUsers}" />
				</h:commandLink>
				<h:commandLink id="sendMail">
					<h:outputLabel value="#{message.manageMails}" />
				</h:commandLink>
				<h:commandLink id="logout" action="#{AdminManagerBean.logOut}">
					<h:outputLabel value="#{message.logoutLabel}" />
				</h:commandLink>
			</h:panelGrid>
		</h:form>
		<h:form id="groupManagingForm">
			<p:tabView>
				<p:tab title="#{message.addNewAuthorizationGroup}">
					<h:panelGrid columns="1">
						<h:panelGroup id="messagesPanel">
							<h:panelGrid columns="1">
								<h:outputFormat
									rendered="#{AdminManagerBean.adminGroupsManager.addingGroupSuccessful}"
									value="#{message.addingGroupSuccessfulMessage}">
									<f:param value="#{AdminManagerBean.adminGroupsManager.addedGroupName}"/>
								</h:outputFormat>
							</h:panelGrid>
						<h:panelGrid columns="2">
							<h:outputLabel value="#{message.enterGroupNameLabel}" />
							<h:inputText id="newGroupName"
								value="#{AdminManagerBean.adminGroupsManager.newGroupName}" />
						</h:panelGrid>
						<h:panelGrid columns="1">
							<p:pickList
								value="#{AdminManagerBean.adminGroupsManager.addingAuthorizations}"
								var="authorization" itemLabel="#{authorization}"
								itemValue="#{authorization}" styleClass="select-menu"/>
							<p:commandButton value="#{message.addNewGroupButtonLabel}" 
								actionListener="#{AdminManagerBean.adminGroupsManager.addNewGroup}"
								update="messagesPanel, selectEditingGroupPanel, groupRemovingPanel"/>
						</h:panelGrid>
						</h:panelGroup>
					</h:panelGrid>
				</p:tab>
				<p:tab title="#{message.editAuthorizationGroup}">
					<h:panelGrid columns="1">
						<h:outputFormat
							rendered="#{AdminManagerBean.adminGroupsManager.editingGroupSuccessful}"
							value="#{message.editingGroupSuccessfulMessage}">
							<f:param value="#{AdminManagerBean.adminGroupsManager.editedGroupName}"/>
						</h:outputFormat>
						<h:panelGrid columns="2" id="selectEditingGroupPanel">
							<h:outputLabel value="#{message.selectAGroupLabel}" />
							<h:selectOneMenu id="editGroupList" value="#{AdminManagerBean.adminGroupsManager.editingGroupName}">
								<f:selectItems value="#{AdminManagerBean.adminGroupsManager.groupList}" />
							</h:selectOneMenu>
							<p:commandButton value="#{message.editGroupButtonLabel}"
								actionListener="#{AdminManagerBean.adminGroupsManager.selectEditGroup}"
								update="groupAuthorizationsEditPanel" />
						</h:panelGrid>
						<p:panel id="groupAuthorizationsEditPanel"
							visible="#{AdminManagerBean.adminGroupsManager.editGroupSelected}">
							<h:panelGrid columns="1"
								rendered="#{AdminManagerBean.adminGroupsManager.editGroupSelected}">
								<p:pickList
									value="#{AdminManagerBean.adminGroupsManager.editingAuthorizations}"
									var="authorization" itemLabel="#{authorization}"
									itemValue="#{authorization}" styleClass="select-menu" />
								<p:commandButton value="#{message.saveGroupButtonLabel}" 
									actionListener="#{AdminManagerBean.adminGroupsManager.saveGroupSettings}"
									update="groupAuthorizationsEditPanel"/>
							</h:panelGrid>
						</p:panel>
					</h:panelGrid>
				</p:tab>
				<p:tab title="#{message.removeAuthorizationGroups}">
					<h:panelGrid columns="1" id="groupRemovingPanel">
						<h:outputFormat
							rendered="#{AdminManagerBean.adminGroupsManager.removingGroupSuccessful}"
							value="#{message.removingGroupSuccessfulMessage}">
							<f:param value="#{AdminManagerBean.adminGroupsManager.removedGroupName}"/>
						</h:outputFormat>
						<h:outputLabel value="#{message.selectGroupToRemoveLabel}" />
						<h:selectOneListbox id="removeGroupList" styleClass="select-menu"
							style="font-size:12px;" value="#{AdminManagerBean.adminGroupsManager.removingGroupName}">
							<f:selectItems value="#{AdminManagerBean.adminGroupsManager.groupList}"/>
						</h:selectOneListbox>
						<p:commandButton value="#{message.removeAuthorizationGroups}"
							actionListener="#{AdminManagerBean.adminGroupsManager.removeGroup}"
							update="groupRemovingPanel, selectEditingGroupPanel"/>
					</h:panelGrid>
				</p:tab>
			</p:tabView>
		</h:form>
	</h:panelGrid>
	 
	<p:dock>
		<p:menuitem icon="/images/trash.png" url="#" />
		<p:menuitem icon="/images/ichat.png" url="#" />
		<p:menuitem icon="/images/stack.png" url="#" />
		<p:menuitem icon="/images/stack.png" url="#" />
		<p:menuitem icon="/images/stack.png" url="#" />
		<p:menuitem icon="/images/stack.png" url="#" />
	</p:dock>
	<p:stack icon="/images/stack.png">
		<p:menuitem value="book" icon="/images/book.png" url="#" />
		<p:menuitem value="Favoriler" icon="/images/yildiz.png" url="#" />
		<p:menuitem value="CD" icon="/images/cd.png" url="#" />
		<p:menuitem value="NOTLAR" icon="/images/notebook.png" url="#" />
		<p:menuitem value="KİTAPLAR" icon="/images/book.png" url="#" />
	</p:stack>




</center>
	</body>
	</html>
</f:view>